package com.example.mobile2021606144ywr0407homework;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

    private TextView tvMainTitle;
    private Button btnAdd;
    private Button btn3Max;
    private Button btnPoyi;
    private Button btnZhuanhuan;
    private Button btnHanshu;
    private Button btnResult;
    private Button btnNum;
    private Button btnLirun;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
        btnAdd.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                    Intent intent=new Intent(MainActivity.this,MainActivity2.class);
                    startActivity(intent);
            }
        });
        btn3Max.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(MainActivity.this,MainActivity3.class);
                startActivity(intent);
            }
        });
        btnPoyi.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(MainActivity.this,MainActivity4.class);
                startActivity(intent);
            }
        });
        btnZhuanhuan.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(MainActivity.this,MainActivity5.class);
                startActivity(intent);
            }
        });
        btnHanshu.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(MainActivity.this,MainActivity6.class);
                startActivity(intent);
            }
        });
        btnResult.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(MainActivity.this,MainActivity7.class);
                startActivity(intent);
            }
        });
        btnNum.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(MainActivity.this,MainActivity8.class);
                startActivity(intent);
            }
        });
        btnLirun.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(MainActivity.this,MainActivity9.class);
                startActivity(intent);
            }
        });
    }


    private void initView() {
        tvMainTitle = (TextView) findViewById(R.id.tv_main_title);
        btnAdd = (Button) findViewById(R.id.btn_add);
        btn3Max = (Button) findViewById(R.id.btn_3Max);
        btnPoyi = (Button) findViewById(R.id.btn_poyi);
        btnZhuanhuan = (Button) findViewById(R.id.btn_zhuanhuan);
        btnHanshu = (Button) findViewById(R.id.btn_hanshu);
        btnResult = (Button) findViewById(R.id.btn_result);
        btnNum = (Button) findViewById(R.id.btn_num);
        btnLirun = (Button) findViewById(R.id.btn_lirun);
    }
}